#ifndef WULC_DILITHIUM_SIGN_H_
#define WULC_DILITHIUM_SIGN_H_

#include <stdint.h>
#include "params.h"
#include "poly.h"
#include "dilithium.h"

/*============================================================================*/
/* Macro definitions                                                          */
/*============================================================================*/

#define challenge DILITHIUM_NAMESPACE(_challenge)
// #define crypto_sign_keypair DILITHIUM_NAMESPACE(_keypair)
#define crypto_sign_signature DILITHIUM_NAMESPACE(_signature)
// #define crypto_sign DILITHIUM_NAMESPACE(_sign)
#define crypto_sign_verify DILITHIUM_NAMESPACE(_verify)
// #define crypto_sign_open DILITHIUM_NAMESPACE(_open)


/*============================================================================*/
/* Function definitions                                                        */
/*============================================================================*/

#ifdef __cplusplus
extern "C"
{ /* start of __cplusplus */
#endif

void challenge(poly *c, const uint8_t seed[SEEDBYTES]);

int crypto_sign_keypair(uint8_t *pk, uint8_t *sk);

int crypto_sign_signature(uint8_t *sig, size_t *siglen,
                          const uint8_t *m, size_t mlen,
                          const uint8_t *sk);

int crypto_sign(uint8_t *sm, size_t *smlen,
                const uint8_t *m, size_t mlen,
                const uint8_t *sk);

int crypto_sign_verify(const uint8_t *sig, size_t siglen,
                       const uint8_t *m, size_t mlen,
                       const uint8_t *pk);

int crypto_sign_open(uint8_t *m, size_t *mlen,
                     const uint8_t *sm, size_t smlen,
                     const uint8_t *pk);



#ifdef __cplusplus
} /* end of __cplusplus */
#endif



#endif //WULC_DILITHIUM_SIGN_H_
